Auto merge of #1533 - mohtar:doc-open, r=wycats
authorbors <bors@rust-lang.org>
Sat, 18 Apr 2015 15:20:10 +0000 (15:20 +0000)
committerbors <bors@rust-lang.org>
Sat, 18 Apr 2015 15:20:10 +0000 (15:20 +0000)
Since #318, the `doc` command generates documentation for binaries in addition to libraries. But currently running `cargo doc --open` would not launch the browser for binary-only packages, even though it should. This commit changes the logic: binaries will be searched when there are no libraries in the package.

A simple test case:

`Cargo.toml`:

    [package]
    name = "foo"
    version = "0.1.0"
    authors = []

`src/main.rs`:

    pub fn main() {
        println!("Hello, world!");
    }

EDIT: I should add that this should fix #1472


Trivial merge